package com.tang.design.observor;

/**
 * @author tmh
 * @date 2024/5/26 21:54
 * @description
 */
public class FirstObserver extends Observer{

    public FirstObserver(Subject subject){
        this.subject=subject;
        this.subject.add(this);
    }
    @Override
    public void print() {
        System.out.println("FirstObserver print"+this.subject.getState());
    }
}
